package com.xms.web.framework;

import com.xms.configuration.model.PlatformSetting;
import com.xms.core.org.IOrgDataServer;
import com.xms.organization.entity.Organization;
import com.xms.security.entity.Privilege;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 * WebAppContext
 * </p>
 *
 * @author migo
 * @since 2021/8/29
 */
public class WebAppContext {
    public void WebAppContext() {

    }

    /// <summary>
    /// //当前请求是否为ajax请求
    /// </summary>
    public boolean IsAjaxRequest;

    /// <summary>
    /// 客户端IP
    /// </summary>
    public String IP;

    /// <summary>
    /// 当前访问的URL
    /// </summary>
    public String Url;

    /// <summary>
    /// 上一次访问的url
    /// </summary>
    public String UrlReferrer;

    /// <summary>
    /// 区域
    /// </summary>
    public String Area;

    /// <summary>
    /// 控制器名称
    /// </summary>
    public String ControllerName;

    /// <summary>
    /// 方法名称
    /// </summary>
    public String ActionName;

    public UUID OrganizationId;

    /// <summary>
    /// 当前组织唯一名称
    /// </summary>
    public String OrganizationUniqueName;

    /// <summary>
    /// 当前组织名称
    /// </summary>
    public String OrganizationName;

    /// <summary>
    /// 页面布局方式
    /// </summary>
    public int LayoutType;

    /// <summary>
    /// 页面标题
    /// </summary>
    public String PageTitle;

    /// <summary>
    /// 是否已登录
    /// </summary>
    public boolean IsSignIn;

    /// <summary>
    /// 登录地址
    /// </summary>
    public String LoginUrl;

    /// <summary>
    /// 登出地址
    /// </summary>
    public String LogoutUrl;

    /// <summary>
    /// 初始化地址
    /// </summary>
    public String InitializationUrl;
    public boolean IsInitialization;
    /// <summary>
    /// 主题
    /// </summary>
    public String Theme;

    // 用户个性化
    public String UserPersonalizations;

    // 平台参数
    public PlatformSetting PlatformSettings;


    /// <summary>
    /// 组织信息
    /// </summary>
    public Organization Org;

    /// 当前用户信息
    //CurrentUser CurrentUser;

    /// 组织数据存储参数
    public IOrgDataServer OrgDataServer;

    /// 菜单树结构数据
    public List<Privilege> PrivilegeTree;
}
